import Vue from 'vue';
import Vuex from 'vuex';
import actions from './actions';
import mutations from './mutations';
import Storage from 'storage';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    user: Storage.getSession('user'),
    defaultUser: Storage.getSession('defaultUser'),
    location: Storage.getSession('location'),
    authToken: Storage.getLocal('authToken'),
    refreshToken: Storage.getLocal('refreshToken'),
    width: 0,
    height: 0
  },
  actions,
  mutations
});
